<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/views/common/includetag.jsp"%>

<!DOCTYPE html>
<html lang="en_US">
    <head>
        <title><spring:message code="app.batch.title" /></title>
        <link rel="stylesheet" type="text/css" href="${ctx}/assets/jqueryplugin/jquery-validation/css/jquery.validate.css" />
        <link rel="stylesheet" type="text/css" href="${ctx}/assets/bootstrap/bootstrap-datepicker/css/datepicker.css" />
        <script type="text/javascript" src="${ctx}/assets/bootstrap/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
		<script type="text/javascript" src="${ctx}/assets/bootstrap/bootstrap-datepicker/js/locales/bootstrap-datepicker.zh-CN.js"></script>
		<link rel="stylesheet" type="text/css" href="${ctx}/assets/jqueryplugin/jquery-ui/jquery-ui.css" />
        <script type="text/javascript" src="${ctx}/assets/jqueryplugin/jquery-ui/jquery-ui.js"></script>
        <script type="text/javascript">
        	var query_batch = '${query_batch}';
    		var query_grade = '${query_grade}';
    		var query_course = '${query_course}';
        </script>
        <script type="text/javascript" src="${ctx}/static/js/manage/examPaper/list.js"></script>
        <style type="text/css">
		.input-group-addon {
		    width: 84px;
		    line-height: 20px;
		    height: 34px;
		    font-size: 12px;
		}
		.input-group {
		    position: relative;
		    display: inline-flex !important;
		    border-collapse: separate;
		    width: 360px;
		    margin-bottom: 5px;
		    line-height: 30px;
		    height: 34px;
		}
		.searchBtn {
		    height: 32px;
		    margin-bottom: 6px;
		}
		.imgPos{
			margin-bottom: 2px;
		}
			
		.ui-progressbar {
			position: relative;
		}
		.progress-label {
		    position: absolute;
		    left: 46%;
		    top: 35px;
		    font-weight: bold;
		    text-shadow: 1px 1px 0 #fff;
		    z-index: 100;
		}
		.ui-progressbar2 {
		    position: relative;
		}
		.progress-label2 {
		    position: absolute;
		    left: 46%;
		    top: 35px;
		    font-weight: bold;
		    text-shadow: 1px 1px 0 #fff;
		    z-index: 100;
		}
		.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default{
		  	display:none;
		}
		.btn-sm, .btn-group-sm > .btn {
		    font-size: 12px;
		    line-height: 20px;
		    margin-bottom: 3px;
		}
        </style>
    </head>
    <body>
        <div class="clearfix"></div>
		<div class="row back-top-title">
			<div class="col-md-12">
				<span><spring:message code="app.examPaper.title" /></span>
			</div>
		</div>
		
       	<div class="row">
			<div class="col-md-12">
				<div class="panel panel-white">
					<div class="panel-body">
						<form style="position:relative" id="splitPage" action="${ctx}/manage/examPaper" method="POST" role="form" class="form-horizontal">  
							<!-- search part -->
							<div id="toolbar" class="panel panel-default" style="margin:-5 0 -5 0;padding:0 0 0 0;">
								<div class="panel-body">
									<div class="form-inline" role="form">
										<div class="form-inline form-group">
											<div class="input-group" style="width: 230px;margin-bottom: 5px;">
												<span class="input-group-addon"><spring:message code="app.batch.title.mc" /></span>
												<select id="query_batch" name="query_batch" class="form-control" style="width:150px;margin-right: 10px;">
													<option value=""><spring:message code="app.common.title.select"/></option>
													<c:forEach var="item" items="${batchs}">
														<option value="${item.batchId}" <c:if test="${query_batch==item.batchId}">selected="selected"</c:if>>${item.batchName}</option>
													</c:forEach>
												</select>
											</div>
											<div class="input-group" style="width: 230px;margin-bottom: 5px;">
												<span class="input-group-addon"><spring:message code="app.common.title.grade.mc" /></span>
												<select id="query_grade" name="query_grade" class="form-control" style="width:150px;margin-right: 10px;"></select>
											</div>
											<div class="input-group" style="width: 230px;margin-bottom: 5px;">
												<span class="input-group-addon"><spring:message code="app.common.title.course.mc" /></span>
												<select id="query_course" name="query_course" class="form-control" style="width:150px;margin-right: 10px;"></select>
											</div>
											<%-- <div class="input-group" style="width: 340px;margin-bottom: 5px;">	
												<span class="input-group-addon"><spring:message code="app.batch.title.ksrq" /></span>
												<div class="input-append date" id="query_ksrq" data-date="" data-date-format="yyyy-mm-dd" style="width: 120px;margin-bottom: -35px;">
													<input type="text" size="16" name="query_ksrq" class="form-control" style="width: 120px;"
														value="<c:if test="${not empty query_ksrq}"><fmt:formatDate value="${query_ksrq}" pattern="yyyy-MM-dd"/></c:if>">
												    <span class="add-on"><i class="icon-th"></i></span>
												</div>
												<span style="margin: 0 5px;">至</span>
												<div class="input-append date" id="query_jsrq" data-date="" data-date-format="yyyy-mm-dd" style="width: 120px;margin-bottom: -35px;">
													<input type="text" size="16" name="query_ksrq" class="form-control" style="width: 120px;"
														value="<c:if test="${not empty query_ksrq}"><fmt:formatDate value="${query_jsrq}" pattern="yyyy-MM-dd"/></c:if>">
												    <span class="add-on"><i class="icon-th"></i></span>
												</div>
											</div>	 --%>
											<button type="submit" class="fa fa-search btn btn-warning searchBtn"><spring:message code="app.common.action.search"/></button>
										</div>
									</div>
							  	</div>
							</div>
							<!-- table part -->
							<table id="dataTable" class="table table-striped table-bordered table-hover table-full-width">
	                            <thead>
	                                <tr>
	                                    <th><spring:message code="app.common.title.serial" /></th>
	                                    <th><spring:message code="app.courseTemplate.title.batchName" /></th>
	                                    <th><spring:message code="app.courseTemplate.title.gradeNo" /></th>
	                                    <th><spring:message code="app.courseTemplate.title.courseNo" /></th>
	                                    <th><spring:message code="app.courseTemplate.title.startDate" /></th>
	                                    <th><spring:message code="app.courseTemplate.title.endDate" /></th>
	                                    <th><spring:message code="app.common.action.operate" /></th>
	                                </tr>
	                            </thead>
	                            <tbody>
	                                <c:forEach items="${pagination.datas}" var="entity" varStatus="s">
	                                    <tr data-id="${entity.id}" data-batchId="${entity.batchId}" data-gradeNo="${entity.gradeNo}" data-courseNo="${entity.courseNo}">
	                                        <td><c:out value="${s.index + 1}" /></td>
	                                        <td><c:out value="${entity.batchName}" /></td>
	                                        <td><c:out value="${entity.gradeNo}" /></td>
	                                        <td><c:out value="${entity.courseNo}" /></td>
	                                        <td><fmt:formatDate value="${entity.startDate}" pattern="yyyy-MM-dd"/></td>
	                                        <td><fmt:formatDate value="${entity.endDate}" pattern="yyyy-MM-dd"/></td>
	                                        <td>
                                            	<a title="<spring:message code="app.examPaper.action.placeholder.upload_paper_zip" />" 
                                            		class="fa fa-cloud-upload btn btn-info btn-sm btn-upload">
                                            		<spring:message code="app.examPaper.action.upload_paper_zip" /></a>
												<a title="<spring:message code="app.examPaper.action.placeholder.paper_check_crop" />" 
													class="fa fa-cut btn btn-success btn-sm btn-check">
													<spring:message code="app.examPaper.action.paper_check_crop" /></a>
												<a title="<spring:message code="app.examPaper.action.placeholder.paper_kh_check" />" 
													class="fa fa-user btn btn-success btn-sm btn-kh-check">
													<spring:message code="app.examPaper.action.paper_kh_check" /></a>
												<a title="<spring:message code="app.examPaper.action.placeholder.upload_paper" />" 
													class="fa fa-list btn btn-warning btn-sm btn-detail">
													<spring:message code="app.examPaper.action.upload_paper" /></a>
												<a title="<spring:message code="app.examPaper.action.placeholder.search_notExist_stu" />" 
													class="fa fa-search btn btn-warning btn-sm btn-surplus-ks">
													<spring:message code="app.examPaper.action.search_notExist_stu" /></a>
												<a title="<spring:message code="app.examPaper.action.placeholder.clear_paper" />" 
													class="fa fa-trash-o btn btn-danger btn-sm btn-clear">
													<spring:message code="app.examPaper.action.clear_paper" /></a>
	                                        </td>
	                                    </tr>
	                                </c:forEach>
	                            </tbody>
	                        </table>
	                        <div class="row" id="splitPageDiv">
								<jsp:include page="/views/common/splitPage.jsp">
									<jsp:param value="mainPanel" name="divId"/>
									<jsp:param value="splitPage" name="formId"/>
									<jsp:param value="splitPageDiv" name="splitPageDiv"/>
								</jsp:include>
							</div>
						</form>
				    </div>
				</div>
			</div>
		</div>
		
		<div style="display:none;" id="dialog_djjy">
			<div id="progress-show-text" style="text-align:center;"></div>
			<div class="progress-label">开始执行校验...</div>
		  	<div id="progressbar"></div>
		</div>
		<div style="display:none;" id="dialog_djcut">
			<div id="progress-show-text2" style="text-align:center;"></div>
			<div class="progress-label2">开始执行切割...</div>
		  	<div id="progressbar2"></div>
		</div>
    </body>
</html>
